import 'package:bookshelf/generated/json/base/json_convert_content.dart';
import 'package:bookshelf/entity/borrow_entity.dart';

BorrowEntity $BorrowEntityFromJson(Map<String, dynamic> json) {
	final BorrowEntity borrowEntity = BorrowEntity();
	final String? readerNo = jsonConvert.convert<String>(json['reader_no']);
	if (readerNo != null) {
		borrowEntity.readerNo = readerNo;
	}
	final String? readerName = jsonConvert.convert<String>(json['reader_name']);
	if (readerName != null) {
		borrowEntity.readerName = readerName;
	}
	final String? bookNo = jsonConvert.convert<String>(json['book_no']);
	if (bookNo != null) {
		borrowEntity.bookNo = bookNo;
	}
	final String? bookTitle = jsonConvert.convert<String>(json['book_title']);
	if (bookTitle != null) {
		borrowEntity.bookTitle = bookTitle;
	}
	final String? readyReturnDate = jsonConvert.convert<String>(json['ready_return_date']);
	if (readyReturnDate != null) {
		borrowEntity.readyReturnDate = readyReturnDate;
	}
	final String? borrowDate = jsonConvert.convert<String>(json['borrow_date']);
	if (borrowDate != null) {
		borrowEntity.borrowDate = borrowDate;
	}
	return borrowEntity;
}

Map<String, dynamic> $BorrowEntityToJson(BorrowEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['reader_no'] = entity.readerNo;
	data['reader_name'] = entity.readerName;
	data['book_no'] = entity.bookNo;
	data['book_title'] = entity.bookTitle;
	data['ready_return_date'] = entity.readyReturnDate;
	data['borrow_date'] = entity.borrowDate;
	return data;
}